package com.awspaas.user.apps.processforsap.util;

import com.actionsoft.apps.resource.interop.aslp.ASLP;
import com.actionsoft.apps.resource.interop.aslp.Meta;
import com.actionsoft.bpms.commons.mvc.view.ResponseObject;
import com.awspaas.user.apps.processforsap.web.SapController;
import java.util.Map;

public class GetDataForMM implements ASLP {
    @Override
    @Meta(parameter = { "name:'uid',required:true,desc:'bpm用户账号'","name:'bindid',required:true,desc:'BINDID'" })
    public ResponseObject call(Map<String, Object> params) {
        System.out.println("params = " + params);
        ResponseObject responseObject = ResponseObject.newOkResponse("接口成功");
        try {
            SapController sapController = new SapController();
            String uid =params.get("uid").toString();
            String bindid =params.get("bindid").toString();
            responseObject = sapController.getData(uid,bindid);
        } catch (Exception e) {
            e.printStackTrace();
            responseObject = ResponseObject.newErrResponse("金蝶待办数据获取出错！");
        }
        return responseObject;
    }
}
